package com.pie4cloud.pie.job.api.feign;

import com.pie4cloud.pie.job.api.dto.PlayBillVo;
import com.pie4cloud.pie.job.api.entity.DispenseCongfigEntity;
import com.pie4cloud.pie.job.api.entity.PlaybillEntity;
import com.pie4cloud.pie.common.core.constant.SecurityConstants;
import com.pie4cloud.pie.common.core.constant.ServiceNameConstants;
import com.pie4cloud.pie.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(contextId = "remoteDispenseCongfigService", value = ServiceNameConstants.JOB_SERVICE)
public interface RemoteDispenseCongfigService {
	@GetMapping("/dispenseConfig/remote/{id}" )
	public R<DispenseCongfigEntity> getRemoteById(@PathVariable("id" ) Long id, @RequestHeader(SecurityConstants.FROM) String from);

	@GetMapping("/playbill/findByDdataId/{ddataId}" )
	public R<PlaybillEntity> findByDdataId(@PathVariable("ddataId" ) String ddataId, @RequestHeader(SecurityConstants.FROM) String from);


	@GetMapping("/playbill/remote/{id}" )
	public R<PlaybillEntity> findByDdataId(@PathVariable("id" ) Long id, @RequestHeader(SecurityConstants.FROM) String from);

	@GetMapping("/dispenseConfig/findByPlayBillId/{playBillId}" )
	public R<PlayBillVo>  findByPlayBillId(@PathVariable("playBillId")  Long playBillId, @RequestHeader(SecurityConstants.FROM) String from);


}
